﻿@model IEnumerable<MVC.Models.Foto>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
            Path
        </th>
        <th>
            Descricao
        </th>
        <th>
            DataFoto
        </th>
        <th>
            SalaId
        </th>
        <th>
            CriancaId
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Path)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Descricao)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.DataFoto)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Sala.SalaId)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Crianca.CriancaId)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.FotoId }) |
            @Html.ActionLink("Details", "Details", new { id=item.FotoId }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.FotoId })
        </td>
    </tr>
}

</table>
